<template>
  <div class="blind--review">
    <div class="blind--wrap" v-if="pos == '甲状腺'">
      <div class="blind--sub">甲状腺:</div>
      <div class="blind--item">
        <span class="blind--name mid">声像图:</span>
        <a-radio-group
          v-model="thyroid_sonogram"
          @change="(event) => handleChange(event, '甲状腺')"
        >
          <a-radio value="正常" :style="radioStyle"> 正常 </a-radio>
          <a-radio value="异常" :style="radioStyle"> 异常 </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid">弥漫性异常:</span>
        <a-radio-group v-model="thyroid_diffuse">
          <a-radio value="有" :disabled="thyroid_sonogram == '正常'" :style="radioStyle">
            有
          </a-radio>
          <a-radio value="无" :disabled="thyroid_sonogram == '正常'" :style="radioStyle">
            无
          </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid">实质性回声:</span>
        <a-radio-group v-model="thyroid_echoes">
          <a-radio value="均匀" :disabled="thyroid_sonogram == '正常'" :style="radioStyle">
            均匀
          </a-radio>
          <a-radio value="不均匀" :disabled="thyroid_sonogram == '正常'" :style="radioStyle">
            不均匀
          </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid">局限性异常回声:</span>
        <a-radio-group v-model="thyroid_localized_echo" @change="(event) => handleChange2(event, '甲状腺')">
          <a-radio value="有" :disabled="thyroid_sonogram == '正常'" :style="radioStyle">
            有
          </a-radio>
          <a-radio value="无" :disabled="thyroid_sonogram == '正常'" :style="radioStyle">
            无
          </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid">局限性异常回声强度:</span>
        <a-radio-group v-model="thyroid_echo_strength">
          <a-radio
            value="无回声"
            :disabled="
               thyroid_localized_echo == '无' || thyroid_sonogram == '正常'
            "
            :style="radioStyle"
          >
            无回声
          </a-radio>
          <a-radio
            value="低回声"
            :disabled="
              thyroid_localized_echo == '无' || thyroid_sonogram == '正常'
            "
            :style="radioStyle"
          >
            低回声
          </a-radio>
          <a-radio
            value="高回声"
            :disabled="
              thyroid_localized_echo == '无' || thyroid_sonogram == '正常'
            "
            :style="radioStyle"
          >
            高回声
          </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid">局限性异常回声形态:</span>
        <a-radio-group v-model="thyroid_echo_shape">
          <a-radio
            value="规则"
            :disabled="
              thyroid_localized_echo == '无' || thyroid_sonogram == '正常'
            "
            :style="radioStyle"
          >
            规则
          </a-radio>
          <a-radio
            value="不规则"
            :disabled="
              thyroid_localized_echo == '无' || thyroid_sonogram == '正常'
            "
            :style="radioStyle"
          >
            不规则
          </a-radio>
        </a-radio-group>
      </div>
    </div>
    <div class="blind--wrap" v-if="pos == '颈动脉'">
      <div class="blind--sub">颈动脉:</div>
      <div class="blind--item">
        <span class="blind--name mid">左侧声像图:</span>
        <a-radio-group
          v-model="artery_sonogram_left"
          @change="(event) => handleChange(event, '颈动脉')"
        >
          <a-radio value="正常" :style="radioStyle"> 正常 </a-radio>
          <a-radio value="异常" :style="radioStyle"> 异常 </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid">左侧斑块:</span>
        <a-radio-group v-model="artery_plaque_left">
          <a-radio value="有" :disabled="artery_sonogram_left == '正常'" :style="radioStyle">
            有
          </a-radio>
          <a-radio value="无" :disabled="artery_sonogram_left == '正常'" :style="radioStyle">
            无
          </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid">左侧血管闭塞:</span>
        <a-radio-group v-model="artery_blood_left">
          <a-radio value="有" :disabled="artery_sonogram_left == '正常'" :style="radioStyle">
            有
          </a-radio>
          <a-radio value="无" :disabled="artery_sonogram_left == '正常'" :style="radioStyle">
            无
          </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid">右侧声像图:</span>
        <a-radio-group
          v-model="artery_sonogram_right"
          @change="(event) => handleChange(event, '右颈动脉')"
        >
          <a-radio value="正常" :style="radioStyle"> 正常 </a-radio>
          <a-radio value="异常" :style="radioStyle"> 异常 </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid">右侧斑块:</span>
        <a-radio-group v-model="artery_plaque_right">
          <a-radio value="有" :disabled="artery_sonogram_right == '正常'" :style="radioStyle">
            有
          </a-radio>
          <a-radio value="无" :disabled="artery_sonogram_right == '正常'" :style="radioStyle">
            无
          </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid">右侧血管闭塞:</span>
        <a-radio-group v-model="artery_blood_right">
          <a-radio value="有" :disabled="artery_sonogram_right == '正常'" :style="radioStyle">
            有
          </a-radio>
          <a-radio value="无" :disabled="artery_sonogram_right == '正常'" :style="radioStyle">
            无
          </a-radio>
        </a-radio-group>
      </div>
    </div>
    <div class="blind--wrap" v-if="pos == '腹部'">
      <template v-if="type=='liver'">
        <div class="blind--sub">肝脏:</div>
        <div class="blind--item">
          <span class="blind--name mid2">声像图:</span>
          <a-radio-group
              v-model="liver_sonogram"
              @change="(event) => handleChange(event, '肝脏')"
          >
            <a-radio value="正常" :style="radioStyle"> 正常 </a-radio>
            <a-radio value="异常" :style="radioStyle"> 异常 </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">肝实质回声弥漫性增强:</span>
          <a-radio-group v-model="liver_diffuse">
            <a-radio value="有" :disabled="liver_sonogram == '正常'" :style="radioStyle">
              有
            </a-radio>
            <a-radio value="无" :disabled="liver_sonogram == '正常'" :style="radioStyle">
              无
            </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">实质性回声:</span>
          <a-radio-group v-model="liver_echoes">
            <a-radio value="均匀" :disabled="liver_sonogram == '正常'" :style="radioStyle">
              均匀
            </a-radio>
            <a-radio value="不均匀" :disabled="liver_sonogram == '正常'" :style="radioStyle">
              不均匀
            </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">局限性异常回声:</span>
          <a-radio-group v-model="liver_localized_echo" @change="(event) => handleChange2(event, '肝脏')">
            <a-radio value="有" :disabled="liver_sonogram == '正常'" :style="radioStyle">
              有
            </a-radio>
            <a-radio value="无" :disabled="liver_sonogram == '正常'" :style="radioStyle">
              无
            </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">局限性异常回声强度:</span>
          <a-radio-group v-model="liver_echo_strength">
            <a-radio
                value="无回声"
                :disabled="liver_sonogram == '正常' || liver_localized_echo == '无'"
                :style="radioStyle"
            >
              无回声
            </a-radio>
            <a-radio
                value="低回声"
                :disabled="liver_sonogram == '正常' || liver_localized_echo == '无'"
                :style="radioStyle"
            >
              低回声
            </a-radio>
            <a-radio
                value="高回声"
                :disabled="liver_sonogram == '正常' || liver_localized_echo == '无'"
                :style="radioStyle"
            >
              高回声
            </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">局限性异常回声形态:</span>
          <a-radio-group v-model="liver_echo_shape">
            <a-radio
                value="规则"
                :disabled="liver_sonogram == '正常' || liver_localized_echo == '无'"
                :style="radioStyle"
            >
              规则
            </a-radio>
            <a-radio
                value="不规则"
                :disabled="liver_sonogram == '正常' || liver_localized_echo == '无'"
                :style="radioStyle"
            >
              不规则
            </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--sub">胆囊:</div>
        <div class="blind--item">
          <span class="blind--name mid2">声像图:</span>
          <a-radio-group
              v-model="gallbladder_sonogram"
              @change="(event) => handleChange(event, '胆囊')"
          >
            <a-radio value="正常" :style="radioStyle"> 正常 </a-radio>
            <a-radio value="异常" :style="radioStyle"> 异常 </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">胆囊壁异常:</span>
          <a-radio-group v-model="gallbladder_wall">
            <a-radio value="有" :disabled="gallbladder_sonogram == '正常'" :style="radioStyle">
              有
            </a-radio>
            <a-radio value="无" :disabled="gallbladder_sonogram == '正常'" :style="radioStyle">
              无
            </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">胆囊腔异常回声:</span>
          <a-radio-group v-model="gallbladder_echoes">
            <a-radio value="有" :disabled="gallbladder_sonogram == '正常'" :style="radioStyle">
              有
            </a-radio>
            <a-radio value="无" :disabled="gallbladder_sonogram == '正常'" :style="radioStyle">
              无
            </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--sub">胰腺:</div>
        <div class="blind--item">
          <span class="blind--name mid2">声像图:</span>
          <a-radio-group
              v-model="pancreas_sonogram"
              @change="(event) => handleChange(event, '胰腺')"
          >
            <a-radio value="正常" :style="radioStyle"> 正常 </a-radio>
            <a-radio value="异常" :style="radioStyle"> 异常 </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">实质性回声:</span>
          <a-radio-group v-model="pancreas_echoes">
            <a-radio value="均匀" :disabled="pancreas_sonogram == '正常'" :style="radioStyle">
              均匀
            </a-radio>
            <a-radio value="不均匀" :disabled="pancreas_sonogram == '正常'" :style="radioStyle">
              不均匀
            </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">局限性异常回声:</span>
          <a-radio-group v-model="pancreas_localized_echo" @change="(event) => handleChange2(event, '胰腺')">
            <a-radio value="有" :disabled="pancreas_sonogram == '正常'" :style="radioStyle">
              有
            </a-radio>
            <a-radio value="无" :disabled="pancreas_sonogram == '正常'" :style="radioStyle">
              无
            </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">局限性异常回声强度:</span>
          <a-radio-group v-model="pancreas_echo_strength">
            <a-radio
                value="无回声"
                :disabled="
              pancreas_sonogram == '正常' || pancreas_localized_echo == '无'
            "
                :style="radioStyle"
            >
              无回声
            </a-radio>
            <a-radio
                value="低回声"
                :disabled="
              pancreas_sonogram == '正常' || pancreas_localized_echo == '无'
            "
                :style="radioStyle"
            >
              低回声
            </a-radio>
            <a-radio
                value="高回声"
                :disabled="
              pancreas_sonogram == '正常' || pancreas_localized_echo == '无'
            "
                :style="radioStyle"
            >
              高回声
            </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">局限性异常回声形态:</span>
          <a-radio-group v-model="pancreas_echo_shape">
            <a-radio
                value="规则"
                :disabled="
              pancreas_sonogram == '正常' || pancreas_localized_echo == '无'
            "
                :style="radioStyle"
            >
              规则
            </a-radio>
            <a-radio
                value="不规则"
                :disabled="
              pancreas_sonogram == '正常' || pancreas_localized_echo == '无'
            "
                :style="radioStyle"
            >
              不规则
            </a-radio>
          </a-radio-group>
        </div>
      </template>
      <template v-if="type=='spleen'">
        <div class="blind--sub">脾脏:</div>
        <div class="blind--item">
          <span class="blind--name mid2">声像图:</span>
          <a-radio-group
              v-model="spleen_sonogram"
              @change="(event) => handleChange(event, '脾脏')"
          >
            <a-radio value="正常" :style="radioStyle"> 正常 </a-radio>
            <a-radio value="异常" :style="radioStyle"> 异常 </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">实质性回声:</span>
          <a-radio-group v-model="spleen_echoes">
            <a-radio value="均匀" :disabled="spleen_sonogram == '正常'" :style="radioStyle">
              均匀
            </a-radio>
            <a-radio value="不均匀" :disabled="spleen_sonogram == '正常'" :style="radioStyle">
              不均匀
            </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">局限性异常回声:</span>
          <a-radio-group v-model="spleen_localized_echo" @change="(event) => handleChange2(event, '脾脏')">
            <a-radio value="有" :disabled="spleen_sonogram == '正常'" :style="radioStyle">
              有
            </a-radio>
            <a-radio value="无" :disabled="spleen_sonogram == '正常'" :style="radioStyle">
              无
            </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">局限性异常回声强度:</span>
          <a-radio-group v-model="spleen_echo_strength">
            <a-radio
                value="无回声"
                :disabled="
              spleen_sonogram == '正常' || spleen_localized_echo == '无'
            "
                :style="radioStyle"
            >
              无回声
            </a-radio>
            <a-radio
                value="低回声"
                :disabled="
              spleen_sonogram == '正常' || spleen_localized_echo == '无'
            "
                :style="radioStyle"
            >
              低回声
            </a-radio>
            <a-radio
                value="高回声"
                :disabled="
              spleen_sonogram == '正常' || spleen_localized_echo == '无'
            "
                :style="radioStyle"
            >
              高回声
            </a-radio>
          </a-radio-group>
        </div>
        <div class="blind--item">
          <span class="blind--name mid2">局限性异常回声形态:</span>
          <a-radio-group v-model="spleen_echo_shape">
            <a-radio
                value="规则"
                :disabled="
              spleen_sonogram == '正常' || spleen_localized_echo == '无'
            "
                :style="radioStyle"
            >
              规则
            </a-radio>
            <a-radio
                value="不规则"
                :disabled="
              spleen_sonogram == '正常' || spleen_localized_echo == '无'
            "
                :style="radioStyle"
            >
              不规则
            </a-radio>
          </a-radio-group>
        </div>
      </template>
    </div>
    <div class="blind--wrap" v-if="pos == '肾脏' || pos == '泌尿'">
      <div class="blind--sub">泌尿:</div>
      <div class="blind--item">
        <span class="blind--name mid2">左肾声像图:</span>
        <a-radio-group
          v-model="kidney_sonogram_left"
          @change="(event) => handleChange(event, '左肾')"
        >
          <a-radio value="正常" :style="radioStyle"> 正常 </a-radio>
          <a-radio value="异常" :style="radioStyle"> 异常 </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid">左肾实质性回声:</span>
        <a-radio-group v-model="kidney_echoes_left">
          <a-radio value="均匀" :disabled="kidney_sonogram_left == '正常'" :style="radioStyle">
            均匀
          </a-radio>
          <a-radio value="不均匀" :disabled="kidney_sonogram_left == '正常'" :style="radioStyle">
            不均匀
          </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid2">左肾局限性异常回声:</span>
        <a-radio-group v-model="kidney_localized_echo_left" @change="(event) => handleChange2(event, '左肾')">
          <a-radio value="有" :disabled="kidney_sonogram_left == '正常'" :style="radioStyle">
            有
          </a-radio>
          <a-radio value="无" :disabled="kidney_sonogram_left == '正常'" :style="radioStyle">
            无
          </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid2">左肾局限性异常回声强度:</span>
        <a-radio-group v-model="kidney_echo_strength_left">
          <a-radio
            value="无回声"
            :disabled="
              kidney_sonogram_left == '正常' ||
              kidney_localized_echo_left == '无'
            "
            :style="radioStyle"
          >
            无回声
          </a-radio>
          <a-radio
            value="低回声"
            :disabled="
              kidney_sonogram_left == '正常' ||
              kidney_localized_echo_left == '无'
            "
            :style="radioStyle"
          >
            低回声
          </a-radio>
          <a-radio
            value="高回声"
            :disabled="
              kidney_sonogram_left == '正常' ||
              kidney_localized_echo_left == '无'
            "
            :style="radioStyle"
          >
            高回声
          </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid2">左肾局限性异常回声形态:</span>
        <a-radio-group v-model="kidney_echo_shape_left">
          <a-radio
            value="规则"
            :disabled="
              kidney_sonogram_left == '正常' ||
              kidney_localized_echo_left == '无'
            "
            :style="radioStyle"
          >
            规则
          </a-radio>
          <a-radio
            value="不规则"
            :disabled="
              kidney_sonogram_left == '正常' ||
              kidney_localized_echo_left == '无'
            "
            :style="radioStyle"
          >
            不规则
          </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid2">右肾声像图:</span>
        <a-radio-group
          v-model="kidney_sonogram_right"
          @change="(event) => handleChange(event, '右肾')"
        >
          <a-radio value="正常" :style="radioStyle"> 正常 </a-radio>
          <a-radio value="异常" :style="radioStyle"> 异常 </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid2">右肾实质性回声:</span>
        <a-radio-group v-model="kidney_echoes_right">
          <a-radio value="均匀" :disabled="kidney_sonogram_right == '正常'" :style="radioStyle">
            均匀
          </a-radio>
          <a-radio value="不均匀" :disabled="kidney_sonogram_right == '正常'" :style="radioStyle">
            不均匀
          </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid2">右肾局限性异常回声:</span>
        <a-radio-group v-model="kidney_localized_echo_right" @change="(event) => handleChange2(event, '右肾')">
          <a-radio value="有" :disabled="kidney_sonogram_right == '正常'" :style="radioStyle">
            有
          </a-radio>
          <a-radio value="无" :disabled="kidney_sonogram_right == '正常'" :style="radioStyle">
            无
          </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid2">右肾局限性异常回声强度:</span>
        <a-radio-group v-model="kidney_echo_strength_right">
          <a-radio
            value="无回声"
            :disabled="
              kidney_sonogram_right == '正常' ||
              kidney_localized_echo_right == '无'
            "
            :style="radioStyle"
          >
            无回声
          </a-radio>
          <a-radio
            value="低回声"
            :disabled="
              kidney_sonogram_right == '正常' ||
              kidney_localized_echo_right == '无'
            "
            :style="radioStyle"
          >
            低回声
          </a-radio>
          <a-radio
            value="高回声"
            :disabled="
              kidney_sonogram_right == '正常' ||
              kidney_localized_echo_right == '无'
            "
            :style="radioStyle"
          >
            高回声
          </a-radio>
        </a-radio-group>
      </div>
      <div class="blind--item">
        <span class="blind--name mid2">右肾局限性异常回声形态:</span>
        <a-radio-group v-model="kidney_echo_shape_right">
          <a-radio
            value="规则"
            :disabled="
              kidney_sonogram_right == '正常' ||
              kidney_localized_echo_right == '无'
            "
            :style="radioStyle"
          >
            规则
          </a-radio>
          <a-radio
            value="不规则"
            :disabled="
              kidney_sonogram_right == '正常' ||
              kidney_localized_echo_right == '无'
            "
            :style="radioStyle"
          >
            不规则
          </a-radio>
        </a-radio-group>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Diagnosis",
  props: ["pos","type","small"],
  data() {
    return {
      thyroid_sonogram: "", //声像图
      thyroid_diffuse: "", //弥漫性异常
      thyroid_echoes: "", //实质性回声
      thyroid_localized_echo: "", //局限性异常回声
      thyroid_echo_strength: "", //局限性异常回声强度
      thyroid_echo_shape: "", //局限性异常回声形态

      artery_sonogram_left: "", //左侧声像图
      artery_plaque_left: "", //左侧斑块
      artery_blood_left: "", //左侧血管闭塞
      artery_sonogram_right: "", //右侧声像图
      artery_plaque_right: "", //右侧斑块
      artery_blood_right: "", //右侧血管闭塞

      kidney_sonogram_left: "", //左肾声像图
      kidney_echoes_left: "", //左肾实质性回声
      kidney_localized_echo_left: "", //左肾局限性异常回声
      kidney_echo_strength_left: "", //左肾局限性异常回声强度
      kidney_echo_shape_left: "", //左肾局限性异常回声形态

      kidney_sonogram_right: "", //右肾声像图
      kidney_echoes_right: "", //右肾实质性回声
      kidney_localized_echo_right: "", //右肾局限性异常回声
      kidney_echo_strength_right: "", //右肾局限性异常回声强度
      kidney_echo_shape_right: "", //右肾局限性异常回声形态

      liver_sonogram: "", //声像图
      liver_diffuse: "", //弥漫性异常
      liver_echoes: "", //实质性回声
      liver_localized_echo: "", //局限性异常回声
      liver_echo_strength: "", //局限性异常回声强度
      liver_echo_shape: "", //局限性异常回声形态

      gallbladder_sonogram: "", //声像图
      gallbladder_wall: "", //胆囊壁异常
      gallbladder_echoes: "", //胆囊腔异常回声

      pancreas_sonogram: "", //声像图
      pancreas_echoes: "", //实质性回声
      pancreas_localized_echo: "", //局限性异常回声
      pancreas_echo_strength: "", //局限性异常回声强度
      pancreas_echo_shape: "", //局限性异常回声形态

      spleen_sonogram: "", //声像图
      spleen_echoes: "", //实质性回声
      spleen_localized_echo: "", //局限性异常回声
      spleen_echo_strength: "", //局限性异常回声强度
      spleen_echo_shape: "", //局限性异常回声形态
    };
  },
  computed:{
    radioStyle(){
      if(this.small){
        return {display: 'block'}
      }else{
        return {}
      }
    }
  },
  created() {
    this.$EventBus.$on("dia_initOldResult", this.initOldResult);
  },
  methods: {
    handleChange(e, type) {
      const val = e.target.value;
      console.log("val", val, "type", type);
      if (val == "正常") {
        if (type == "甲状腺") {
          if (
            this.thyroid_diffuse ||
            this.thyroid_echoes ||
            this.thyroid_localized_echo ||
            this.thyroid_echo_strength ||
            this.thyroid_echo_shape
          ) {
            this.thyroid_diffuse = "";
            this.thyroid_echoes = "";
            this.thyroid_localized_echo = "";
            this.thyroid_echo_strength = "";
            this.thyroid_echo_shape = "";
          }
        } else if (type == "颈动脉") {
          if (this.artery_plaque_left || this.artery_blood_left) {
            this.artery_plaque_left = "";
            this.artery_blood_left = "";
          }
        } else if (type == "右颈动脉") {
          if (this.artery_plaque_right || this.artery_blood_right) {
            this.artery_plaque_right = "";
            this.artery_blood_right = "";
          }
        } else if (type == "肝脏") {
          if (
            this.liver_diffuse ||
            this.liver_echoes ||
            this.liver_localized_echo ||
            this.liver_echo_strength ||
            this.liver_echo_shape
          ) {
            this.liver_diffuse = "";
            this.liver_echoes = "";
            this.liver_localized_echo = "";
            this.liver_echo_strength = "";
            this.liver_echo_shape = "";
          }
        } else if (type == "胆囊") {
          if (this.gallbladder_wall || this.gallbladder_echoes) {
            this.gallbladder_wall = "";
            this.gallbladder_echoes = "";
          }
        } else if (type == "胰腺") {
          if (
            this.pancreas_echoes ||
            this.pancreas_localized_echo ||
            this.pancreas_echo_strength ||
            this.pancreas_echo_shape
          ) {
            this.pancreas_echoes = "";
            this.pancreas_localized_echo = "";
            this.pancreas_echo_strength = "";
            this.pancreas_echo_shape = "";
          }
        } else if (type == "脾脏") {
          if (
            this.spleen_echoes ||
            this.spleen_localized_echo ||
            this.spleen_echo_strength ||
            this.spleen_echo_shape
          ) {
            this.spleen_echoes = "";
            this.spleen_localized_echo = "";
            this.spleen_echo_strength = "";
            this.spleen_echo_shape = "";
          }
        } else if (type == "左肾") {
          if (
            this.kidney_echoes_left ||
            this.kidney_localized_echo_left ||
            this.kidney_echo_strength_left ||
            this.kidney_echo_shape_left
          ) {
            this.kidney_echoes_left = "";
            this.kidney_localized_echo_left = "";
            this.kidney_echo_strength_left = "";
            this.kidney_echo_shape_left = "";
          }
        } else if (type == "右肾") {
          if (
            this.kidney_echoes_right ||
            this.kidney_localized_echo_right ||
            this.kidney_echo_strength_right ||
            this.kidney_echo_shape_right
          ) {
            this.kidney_echoes_right = "";
            this.kidney_localized_echo_right = "";
            this.kidney_echo_strength_right = "";
            this.kidney_echo_shape_right = "";
          }
        }
      }
    },
    handleChange2(e, type){
      const val = e.target.value;
      console.log("val", val, "type", type);
      if (val == "无") {
        if (type == "甲状腺") {
          if (
              this.thyroid_echo_strength ||
              this.thyroid_echo_shape
          ) {
            this.thyroid_echo_strength = "";
            this.thyroid_echo_shape = "";
          }
        }  else if (type == "肝脏") {
          if (
              this.liver_echo_strength ||
              this.liver_echo_shape
          ) {
            this.liver_echo_strength = "";
            this.liver_echo_shape = "";
          }
        } else if (type == "胆囊") {
          if (this.gallbladder_wall || this.gallbladder_echoes) {
            this.gallbladder_wall = "";
            this.gallbladder_echoes = "";
          }
        } else if (type == "胰腺") {
          if (
              this.pancreas_echo_strength ||
              this.pancreas_echo_shape
          ) {
            this.pancreas_echo_strength = "";
            this.pancreas_echo_shape = "";
          }
        } else if (type == "脾脏") {
          if (
              this.spleen_echo_strength ||
              this.spleen_echo_shape
          ) {
            this.spleen_echo_strength = "";
            this.spleen_echo_shape = "";
          }
        } else if (type == "左肾") {
          if (
              this.kidney_echo_strength_left ||
              this.kidney_echo_shape_left
          ) {
            this.kidney_echo_strength_left = "";
            this.kidney_echo_shape_left = "";
          }
        } else if (type == "右肾") {
          if (
              this.kidney_echo_strength_right ||
              this.kidney_echo_shape_right
          ) {
            this.kidney_echo_strength_right = "";
            this.kidney_echo_shape_right = "";
          }
        }
      }
    },
    initOldResult(val) {
      console.log("initOldResult val", val);
      try {
        if (this.pos == "甲状腺") {
          const map = {
            声像图: "thyroid_sonogram",
            弥漫性异常: "thyroid_diffuse",
            实质性回声: "thyroid_echoes",
            局限性异常回声: "thyroid_localized_echo",
            局限性异常回声强度: "thyroid_echo_strength",
            局限性异常回声形态: "thyroid_echo_shape",
          };
          for (const prop in val) {
            if (map[prop]) {
              this[map[prop]] = val[prop];
            }
          }
        } else if (this.pos == "颈动脉") {
          const map = {
            左侧声像图: "artery_sonogram_left",
            左侧斑块: "artery_plaque_left",
            左侧血管闭塞: "artery_blood_left",
            右侧声像图: "artery_sonogram_right",
            右侧斑块: "artery_plaque_right",
            右侧血管闭塞: "artery_blood_right",
          };
          for (const prop in val) {
            if (map[prop]) {
              this[map[prop]] = val[prop];
            }
          }
        } else if (this.pos == "腹部") {
          for (const prop in val) {
            if (prop == "肝脏") {
              const targetVal = val[prop];
              const map = {
                声像图: "liver_sonogram",
                肝实质回声弥漫性增强: "liver_diffuse",
                实质性回声: "liver_echoes",
                局限性异常回声: "liver_localized_echo",
                局限性异常回声强度: "liver_echo_strength",
                局限性异常回声形态: "liver_echo_shape",
              };
              for (const p in targetVal) {
                if (map[p]) {
                  this[map[p]] = targetVal[p];
                }
              }
            } else if (prop == "胆囊") {
              const targetVal = val[prop];
              const map = {
                声像图: "gallbladder_sonogram",
                胆囊壁异常: "gallbladder_wall",
                胆囊腔异常回声: "gallbladder_echoes",
              };
              for (const p in targetVal) {
                if (map[p]) {
                  this[map[p]] = targetVal[p];
                }
              }
            } else if (prop == "胰腺") {
              const targetVal = val[prop];
              const map = {
                声像图: "pancreas_sonogram",
                实质性回声: "pancreas_echoes",
                局限性异常回声: "pancreas_localized_echo",
                局限性异常回声强度: "pancreas_echo_strength",
                局限性异常回声形态: "pancreas_echo_shape",
              };
              for (const p in targetVal) {
                if (map[p]) {
                  this[map[p]] = targetVal[p];
                }
              }
            } else if (prop == "脾脏") {
              const targetVal = val[prop];
              const map = {
                声像图: "spleen_sonogram",
                实质性回声: "spleen_echoes",
                局限性异常回声: "spleen_localized_echo",
                局限性异常回声强度: "spleen_echo_strength",
                局限性异常回声形态: "spleen_echo_shape",
              };
              for (const p in targetVal) {
                if (map[p]) {
                  this[map[p]] = targetVal[p];
                }
              }
            }
          }
        } else if (this.pos == "肾脏" || this.pos == "泌尿") {
          const map = {
            左肾声像图: "kidney_sonogram_left",
            左肾实质性回声: "kidney_echoes_left",
            左肾局限性异常回声: "kidney_localized_echo_left",
            左肾局限性异常回声强度: "kidney_echo_strength_left",
            左肾局限性异常回声形态: "kidney_echo_shape_left",
            右肾声像图: "kidney_sonogram_right",
            右肾实质性回声: "kidney_echoes_right",
            右肾局限性异常回声: "kidney_localized_echo_right",
            右肾局限性异常回声强度: "kidney_echo_strength_right",
            右肾局限性异常回声形态: "kidney_echo_shape_right",
          };
          for (const prop in val) {
            if (map[prop]) {
              this[map[prop]] = val[prop];
            }
          }
        }
      } catch (error) {
        console.log("扫查影像合格率 initOldResult error: ", error);
      }
    },
    getResult() {
      try {
        if (this.pos == "甲状腺") {
          if (!this.thyroid_sonogram
          ) {
            this.$message.warning("请对诊断一致性进行评价!");
            return;
          }
          if (this.thyroid_sonogram == "正常") {
            return {
              甲状腺: {
                声像图: this.thyroid_sonogram,
                弥漫性异常: this.thyroid_diffuse,
                实质性回声: this.thyroid_echoes,
                局限性异常回声: this.thyroid_localized_echo,
                局限性异常回声强度: this.thyroid_echo_strength,
                局限性异常回声形态: this.thyroid_echo_shape,
              },
            };
          } else {
            if (this.thyroid_localized_echo == "无") {
              return {
                甲状腺: {
                  声像图: this.thyroid_sonogram,
                  弥漫性异常: this.thyroid_diffuse,
                  实质性回声: this.thyroid_echoes,
                  局限性异常回声: this.thyroid_localized_echo,
                  局限性异常回声强度: this.thyroid_echo_strength,
                  局限性异常回声形态: this.thyroid_echo_shape,
                },
              };
            } else {
              return {
                甲状腺: {
                  声像图: this.thyroid_sonogram,
                  弥漫性异常: this.thyroid_diffuse,
                  实质性回声: this.thyroid_echoes,
                  局限性异常回声: this.thyroid_localized_echo,
                  局限性异常回声强度: this.thyroid_echo_strength,
                  局限性异常回声形态: this.thyroid_echo_shape,
                },
              };
            }
          }
        } else if (this.pos == "颈动脉") {
          if (!this.artery_sonogram_left
              || !this.artery_sonogram_right
          ) {
            this.$message.warning("请对诊断一致性进行评价!");
            return;
          }
          let left_res, right_res;
          if (this.artery_sonogram_left == "正常") {
            left_res = {
              左侧声像图: this.artery_sonogram_left,
              左侧斑块: this.artery_plaque_left,
              左侧血管闭塞: this.artery_blood_left,
            };
          } else {
            left_res = {
              左侧声像图: this.artery_sonogram_left,
              左侧斑块: this.artery_plaque_left,
              左侧血管闭塞: this.artery_blood_left,
            };
          }
          if (this.artery_sonogram_right == "正常") {
            right_res = {
              右侧声像图: this.artery_sonogram_right,
              右侧斑块: this.artery_plaque_right,
              右侧血管闭塞: this.artery_blood_right,
            };
          } else {
            right_res = {
              右侧声像图: this.artery_sonogram_right,
              右侧斑块: this.artery_plaque_right,
              右侧血管闭塞: this.artery_blood_right,
            };
          }
          return {
            颈动脉: {
              ...left_res,
              ...right_res,
            },
          };
        } else if (this.pos == "腹部") {
          if(this.type == "liver"){
            if (!this.liver_sonogram
                || !this.gallbladder_sonogram
                || !this.pancreas_sonogram
            ) {
              this.$message.warning("请对诊断一致性进行评价!");
              return;
            }
          }else{
            if (!this.spleen_sonogram) {
              this.$message.warning("请对诊断一致性进行评价!");
              return;
            }
          }
          let liver, gallbladder, pancreas, spleen;
          //肝脏
          if (this.liver_sonogram == "正常") {
            liver = {
              声像图: this.liver_sonogram,
              肝实质回声弥漫性增强: this.liver_diffuse,
              实质性回声: this.liver_echoes,
              局限性异常回声: this.liver_localized_echo,
              局限性异常回声强度: this.liver_echo_strength,
              局限性异常回声形态: this.liver_echo_shape,
            };
          } else {
            if (this.liver_localized_echo == "无") {
              liver = {
                声像图: this.liver_sonogram,
                肝实质回声弥漫性增强: this.liver_diffuse,
                实质性回声: this.liver_echoes,
                局限性异常回声: this.liver_localized_echo,
                局限性异常回声强度: this.liver_echo_strength,
                局限性异常回声形态: this.liver_echo_shape,
              };
            } else {
              liver = {
                声像图: this.liver_sonogram,
                肝实质回声弥漫性增强: this.liver_diffuse,
                实质性回声: this.liver_echoes,
                局限性异常回声: this.liver_localized_echo,
                局限性异常回声强度: this.liver_echo_strength,
                局限性异常回声形态: this.liver_echo_shape,
              };
            }
          }
          //胆囊
          if (this.gallbladder_sonogram == "正常") {
            gallbladder = {
              声像图: this.gallbladder_sonogram,
              胆囊壁异常: this.gallbladder_wall,
              胆囊腔异常回声: this.gallbladder_echoes,
            };
          } else {
            gallbladder = {
              声像图: this.gallbladder_sonogram,
              胆囊壁异常: this.gallbladder_wall,
              胆囊腔异常回声: this.gallbladder_echoes,
            };
          }
          //胰腺
          if (this.pancreas_sonogram == "正常") {
            pancreas = {
              声像图: this.pancreas_sonogram,
              实质性回声: this.pancreas_echoes,
              局限性异常回声: this.pancreas_localized_echo,
              局限性异常回声强度: this.pancreas_echo_strength,
              局限性异常回声形态: this.pancreas_echo_shape,
            };
          } else {
            if (this.pancreas_localized_echo == "无") {
              pancreas = {
                声像图: this.pancreas_sonogram,
                实质性回声: this.pancreas_echoes,
                局限性异常回声: this.pancreas_localized_echo,
                局限性异常回声强度: this.pancreas_echo_strength,
                局限性异常回声形态: this.pancreas_echo_shape,
              };
            } else {
              pancreas = {
                声像图: this.pancreas_sonogram,
                实质性回声: this.pancreas_echoes,
                局限性异常回声: this.pancreas_localized_echo,
                局限性异常回声强度: this.pancreas_echo_strength,
                局限性异常回声形态: this.pancreas_echo_shape,
              };
            }
          }
          //脾脏
          if (this.spleen_sonogram == "正常") {
            spleen = {
              声像图: this.spleen_sonogram,
              实质性回声: this.spleen_echoes,
              局限性异常回声: this.spleen_localized_echo,
              局限性异常回声强度: this.spleen_echo_strength,
              局限性异常回声形态: this.spleen_echo_shape,
            };
          } else {
            if (this.spleen_localized_echo == "无") {
              spleen = {
                声像图: this.spleen_sonogram,
                实质性回声: this.spleen_echoes,
                局限性异常回声: this.spleen_localized_echo,
                局限性异常回声强度: this.spleen_echo_strength,
                局限性异常回声形态: this.spleen_echo_shape,
              };
            } else {
              spleen = {
                声像图: this.spleen_sonogram,
                实质性回声: this.spleen_echoes,
                局限性异常回声: this.spleen_localized_echo,
                局限性异常回声强度: this.spleen_echo_strength,
                局限性异常回声形态: this.spleen_echo_shape,
              };
            }
          }
          return {
            肝脏: {
              ...liver,
            },
            胆囊: {
              ...gallbladder,
            },
            胰腺: {
              ...pancreas,
            },
            脾脏: {
              ...spleen,
            },
          };
        } else if (this.pos == "肾脏" || this.pos == "泌尿") {
          let left_res, right_res;
          if (!this.kidney_sonogram_left
              || !this.kidney_sonogram_right
          ) {
            this.$message.warning("请对诊断一致性进行评价!");
            return;
          }
          if (this.kidney_sonogram_left == "正常") {
            left_res = {
              左肾声像图: this.kidney_sonogram_left,
              左肾实质性回声: this.kidney_echoes_left,
              左肾局限性异常回声: this.kidney_localized_echo_left,
              左肾局限性异常回声强度: this.kidney_echo_strength_left,
              左肾局限性异常回声形态: this.kidney_echo_shape_left,
            };
          } else {
            left_res = {
              左肾声像图: this.kidney_sonogram_left,
              左肾实质性回声: this.kidney_echoes_left,
              左肾局限性异常回声: this.kidney_localized_echo_left,
              左肾局限性异常回声强度: this.kidney_echo_strength_left,
              左肾局限性异常回声形态: this.kidney_echo_shape_left,
            };
          }
          if (this.kidney_sonogram_right == "正常") {
            right_res = {
              右肾声像图: this.kidney_sonogram_right,
              右肾实质性回声: this.kidney_echoes_right,
              右肾局限性异常回声: this.kidney_localized_echo_right,
              右肾局限性异常回声强度: this.kidney_echo_strength_right,
              右肾局限性异常回声形态: this.kidney_echo_shape_right,
            };
          } else {
            right_res = {
              右肾声像图: this.kidney_sonogram_right,
              右肾实质性回声: this.kidney_echoes_right,
              右肾局限性异常回声: this.kidney_localized_echo_right,
              右肾局限性异常回声强度: this.kidney_echo_strength_right,
              右肾局限性异常回声形态: this.kidney_echo_shape_right,
            };
          }
          return {
            泌尿: {
              ...left_res,
              ...right_res,
            },
          };
        }
      } catch (error) {
        console.log("扫查影像合格率 getResult error: ", error);
      }
    },
  },
  beforeDestroy() {
    this.$EventBus.$off("dia_initOldResult");
  }
};
</script>

<style scoped lang="less">
@import "~@/assets/css/blindReview.less";
</style>
